package cn.green;

import cn.green.components.model.SysUser;
import cn.green.data.UserDataRepository;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class SecurityApplication {

    public static void main(String[] args) {
        //在系统启动时，向内存加入一个用户(ADMIN权限)
        //SysUser adminInfo = new SysUser("a", "admin", "123456", "ADMIN", true,true,true, true);
        //UserDataRepository.addSysUser(adminInfo);
        //向内存加入一个用户(USER)
        //SysUser userInfo = new SysUser("b","user", "123456", "USER", true, true, true,true);
        //UserDataRepository.addSysUser(userInfo);
        try {
            SpringApplication.run(SecurityApplication.class, args);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
